import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

//爱框框
public class problem2 {
    public static void main(String[] args) throws IOException {
        Read in = new Read();
        int n = in.nextInt(), x = in.nextInt();
        int[] arr = new int[n+1];
        for (int i = 1; i <= n ; i++) {
            arr[i] = in.nextInt();
        }

        int left = 1, right = 1, sum = 0;
        int retLeft = -1, retRight = -1, retLen = n;

        while(right <= n) {
            //进窗口
            sum += arr[right];
            while(sum >= x) {
                //更新结果
                if(right - left + 1 < retLen) {
                    retLeft = left;
                    retRight = right;
                    retLen = right - left + 1;
                }
                sum -= arr[left++];
            }
            right++;
        }
        System.out.println(retLeft + " " + retRight);
    }
}

class Read {
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

    String next() throws IOException {
        while(!st.hasMoreTokens()) {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    String nextLine() throws IOException {
        return bf.readLine();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}
